home *** CD-ROM | disk | FTP | other *** search
/ Champak 29 / Volume 29 - JOGO DISK .iso / Games / jungle_adventure.swf / scripts / __Packages / VR_EMP.as < prev    next >
Text File  |  2006-11-29  |  811b  |  37 lines

  1. class VR_EMP extends GameCollectable
  2. {
  3.    var assetID = "EMP";
  4.    var editor_isItem = true;
  5.    var editor_name = "VR_EMP";
  6.    function VR_EMP()
  7.    {
  8.       super();
  9.    }
  10.    function onAddToWorld()
  11.    {
  12.       if(!_global.VR_ON_EMP)
  13.       {
  14.          this.world.removeObject(this);
  15.          return undefined;
  16.       }
  17.    }
  18.    function setCollected(obj)
  19.    {
  20.       if(this.collected)
  21.       {
  22.          return undefined;
  23.       }
  24.       this.collected = true;
  25.       obj.emp = true;
  26.       var _loc3_ = undefined;
  27.       var _loc2_ = _loc3_ = this.world.activeObjects.length;
  28.       while((_loc2_ = _loc2_ - 1) > -1)
  29.       {
  30.          _loc3_[_loc2_].immobilize();
  31.          _loc3_[_loc2_].immobilized = 2;
  32.       }
  33.       GameSound.playSound("vr");
  34.       this.world.removeObject(this);
  35.    }
  36. }
  37.